{extend name="wmcommon/newbase" /}
{block name='top'}
<div class="top">
    <div class="top-row">
        <div class="logo"><img src="__STATIC__/wm_newindex/images/logo.jpg" /></div>
        <div id="nav" class="nav" style="max-height:none !important;">
            <ul>
                <li class="nav_z {if empty($pcate)}active{/if}">
                    <a href="/">首页</a>
                </li>
                {foreach $category as $v}
                <li class="nav_z {if isset($pcate) && $v.id==$pcate.id}active{/if}">
                    {php}$pid = $v['id']{/php}
                    <a href='{:url("/item/$pid")}'>{$v.name ?: ''}</a>
                    {notempty name='v.sub'}
                    <dl style="display:none;">
                        {foreach $v.sub as $vo}
                        {php}$id = $vo['id']{/php}
                        <dd><a href='{:url("/item/$pid-$id")}'>{$vo.name ?: ''}</a></dd>
                        {/foreach}
                    </dl>
                    {/notempty}
                </li>
                {/foreach}
            </ul>
        </div>
        <!--<div class="login"><a href="#"><b>登录</b></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">注册</a></div>-->
        <div class="search">
            <img src="__STATIC__/wm_index/images/wm/400.jpg">
        </div>
    </div>
</div>

<script>
    var navigation = responsiveNav("#nav");
</script>
<script>
    $(function(){

        if ( $(window).width() > 768) {

            $(".nav_z").hover(function(){
                var NavDlLeft = ($(this).width() - 110) / 2;
                $(this).find("dl").css("left",NavDlLeft);
                $(this).find("dl").fadeIn();

            },function(){
                $(this).find("dl").fadeOut();
            });
        } else {
            $(".nav_z").click(function(){
                $(this).find("dl").toggle();
            });
        };

    });
</script>
{/block}


{block name='newfooter'}
<div class="container-fluid bottom">
    <div class="container">
        <div class="col-xs-12 col-sm-8 bottom_copy">
            <a href="#">产品服务</a>
            &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
            <a href="#">未名学院</a>
            &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
            <a href="#">服务保障</a>
            &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
            <a href="#">关于我们</a>
            <br />
            ICP备案号：京ICP备17009611号-3 Copyright 2012-2016,wmyanxue.com All Rights Reserved 网安备11010802021470号<br />
            总部地址：北京市海淀区善缘街立方庭大厦
        </div>
        <div class="col-xs-12 col-sm-4 bottom_ewm">
            <div class="col-xs-6">
                <img src="__STATIC__/wm_newindex/images/ewm01.jpg" /><br />
                未名研学公众号二维码
            </div>
            <div class="col-xs-6">
                <img src="__STATIC__/wm_newindex/images/ewm02.jpg" /><br />
                研学巴士公众号二维码
            </div>
        </div>
    </div>
</div>
{/block}

{block name='footerjs'}
<script src="__STATIC__/wm_index/js/wm/360.js"></script>
<script src="__STATIC__/wm_index/js/wm/idangerous.swiper.js"></script>
<script src="__STATIC__/wm_index/js/wm/isScroll.js"></script>
<script>
    $(function () {
        // 加载头部和底部
        //$("#header").load("header.html", function () {
        //    $("#header .index").addClass("on");
        //});
        //$("#footer").load("footer.html");
        // banner
        var banner = new Swiper('#banner', {
            autoplay: 5000, //可选选项，自动滑动
            loop: true, //可选选项，开启循环
            pagination: '.pagination',
            autoplayDisableOnInteraction: false,
        });
        // 跑马灯
        var silvertrack = new Swiper('#silvertrack', {
            autoplay: 1, //可选选项，自动滑动
            speed: 3000,
            loop: true, //可选选项，开启循环
            slidesPerView: "auto",
            loopedSlides: 3,
            autoplayDisableOnInteraction: false,
        });
        // 滚动动画
        $(".xScroll").xScroll();
        // 机构
        var institutions_list = new Swiper('#institutions_list', {
            slidesPerView: "auto",
        });
        // prev
        $("#institutions").on("click", ".btn_left", function () {
            institutions_list.swipePrev();
        });
        // next
        $("#institutions").on("click", ".btn_right", function () {
            institutions_list.swipeNext();
        });
        // 精品课程大搜索
        $("#search_course").on("click", ".tab .tab_item", function () {
            if (!$(this).hasClass("on")) {
                $(this).addClass("on").siblings(".tab_item").removeClass("on");
            }
        });
        $("#search_course").on("click", ".right .box span", function () {
            if (!$(this).hasClass("on")) {
                $(this).addClass("on").siblings("span").removeClass("on");
            }
        });
    })
</script>
{/block}